package com.linkage.bss.crm.packagemgr.util;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;


import com.linkage.bss.crm.multidb.util.RouteUtil;

/**
 *
 * <一句话功能简述>
 * <功能详细描述>
 *
 * @author  Administrator
 * @version  [版本号, 2013-5-27]
 * @see  [相关类/方法]
 * @since  [产品/模块版本]
 */
public class DataRouteUtilFilter implements Filter {
	public void destroy() {
	}

	public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException,
					ServletException {
//		RouteUtil.initAreaInfo();
//		RouteUtil.setRouteAreaInfo(null);
//		LoginedStaffInfo staffInfo = (LoginedStaffInfo) ((HttpServletRequest) request).getSession().getAttribute(
//						"loginedStaffInfo");
//
//		if (staffInfo != null && staffInfo.getZoneNumber() != null) {
//			RouteUtil.setCurAreaCode(staffInfo.getZoneNumber());
//		} else if (staffInfo != null && staffInfo.getAreaId() != null) {
//			RouteUtil.setCurSessionAreaId(staffInfo.getAreaId().toString());
//		}

		filterChain.doFilter(request, response);
	}

	public void init(FilterConfig filterconfig) throws ServletException {
	}

}
